<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.picFormSubFun("#form",'/modules/loan/borrow/addMortgage.html');	
	});
</script>
<form id="form" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="${id}">
<div class="borrowForm" style="border-top:0;">
	<h2 class="borrowFormTitle">资产监控</h2>
	<div class="car_type">
		<div class="car_type_item">
			<div class="car_type_item">
				<ul class="type_item">
					<li><span>车型：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList[0].carType" data-options="required: true" autocomplete="off"/></li>
					<li><span>车驾号：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList[0].carNo" data-options="required: true" autocomplete="off" /></li>
					<li><span>评估价：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList[0].assessPrice" data-options="required: true" autocomplete="off"/></li>
					<li><span>抵押价：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList[0].mortgagePrice" data-options="required: true" autocomplete="off"/></li>
				</ul>
			</div>
			<span>上传实物照：</span>
	        <div id="uploadRealPhotoShowBox" data-arr="uploadFile" style="height: auto;">
	            <ul id="uploadPiclist" class="photoUpload" style="list-style: none; padding: 0; margin: 0;">
	                <li class="add_btn" style="float: left;">
	                  <i class="a"></i> <i class="b"></i>
	                  <input type="file" name="file" id="uploadFile" onchange="return ajaxFileUpload1('uploadFile','/imageUp.jsp','physicalPicPath0');" title="点击上传图片" />
	                </li>
	            </ul>
	       </div>
		</div>
		<div class="car_type_item">
			<span>上传档案照：</span>
	        <div id="uploadFilePhotoShowBox" data-arr="uploadFile" style="height: auto;">
	            <ul id="uploadPiclist1" class="photoUpload" style="list-style: none; padding: 0; margin: 0;">
	                <li class="add_btn" style="float: left;">
	                  <i class="a"></i> <i class="b"></i>
	                  <input type="file" name="file" id="uploadFile1" onchange="return ajaxFileUpload1('uploadFile1','/imageUp.jsp','archivesPicPath0');" title="点击上传图片" />
	                </li>
	            </ul>
	       </div>
		</div>
	</div>
	<div class="add_car_type"><a href="javascript:;" class="addCarTypeBtn">添加</a></div>
</div>
</form>
<script>
//抵押车型增加
	var count = 1;
	function countSub(num)
	{
		$(".car_type"+num).remove();
		count = count - 1;
	}
	$(".addCarTypeBtn").click(function(){
		var html ='<div class="car_type car_type'+count+'"><div class="car_type_item"><ul class="type_item"><li><span>车型：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList['+count+'].carType" data-options="required: true" autocomplete="off"/></li><li><span>车驾号：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList['+count+'].carNo" data-options="required: true" autocomplete="off" /></li><span class="remove_car_type" onclick="countSub('+count+')">&nbsp;</span><li><span>评估价：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList['+count+'].assessPrice" data-options="required: true"  autocomplete="off"/></li><li><span>抵押价：</span><input type="text" class="car_type_input easyui-validatebox" name="borrowMortgageList['+count+'].mortgagePrice" data-options="required: true" autocomplete="off"/></li></ul></div><div class="car_type_item"><span>上传实物照：</span><div id="uploadRealPhotoBox'+count+'" data-arr="uploadFile" style="height: auto;"><ul id="uploadPiclist" class="photoUpload" style="list-style: none; padding: 0; margin: 0;"><li class="add_btn" style="float: left;"><i class="a"></i> <i class="b"></i><input type="file" name="uploadRealPhotoStatus" id="uploadFile2'+count+'" onchange="return ajaxFileUpload1(\'uploadFile2'+count+'\',\'/imageUp.jsp\',\'physicalPicPath'+count+'\');" title="点击上传图片" /></li></ul></div></div><div class="car_type_item"><span>上传档案照：</span><div id="uploadFilePhotoBox'+count+'" data-arr="uploadFile" style="height: auto;"><ul id="uploadPiclist1'+count+'" class="photoUpload" style="list-style: none; padding: 0; margin: 0;"><li class="add_btn" style="float: left;"><i class="a"></i> <i class="b"></i><input type="file" name="uploadFilePhotoStatus" id="uploadFile3'+count+'" onchange="return ajaxFileUpload1(\'uploadFile3'+count+'\',\'/imageUp.jsp\',\'archivesPicPath'+count+'\');" title="点击上传图片" /></li></ul></div></div>';
		$(this).parent().before(html);
		count = count + 1;
	});
	
</script>	
<script type="text/javascript">seajs.use("${theme_dir}/js/ajaxfileupload");seajs.use("${theme_dir}/js/upload");</script>
<!-- 图片预览-->
<script type="text/javascript">
	$(".fileshow").fancybox();
</script>